#ifndef TRIANGLE_H
#define TRIANGLE_H

#include "CloseShape.h"

class Triangle : public CloseShape {
public:
    explicit Triangle(const QPointF& pos = { 0, 0 });
    Triangle(const Triangle& other);

    std::shared_ptr<IShape> clone() const override;
    std::unique_ptr<IShape> init(const QPointF& pos = { 0, 0 }) override;
    QString toSVG() const override;
    static std::unique_ptr<Triangle> createFromSVG(const QDomElement& element);
    QPainterPath shape() const override;
    std::vector<QPointF> linkPoints() const override;

private:
    std::vector<QPointF> getVertices() const;
};

#endif // TRIANGLE_H